package com.example.user.biz.domain.dto;

import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.URL;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UpdateUserInfoDTO {
    @NotNull(message = "性别不能为空")
    @Min(value = 0, message = "性别值不合法")
    @Max(value = 2, message = "性别值不合法")
    private Integer gender;

    @NotBlank(message = "昵称不能为空")
    @Size(min = 2, max = 20, message = "昵称长度需在2-20个字符之间")
    private String nickname;

    @URL(message = "头像URL格式不正确")
    private String avatar;

    @NotNull(message = "生日不能为空")
    private Date birthday;

    @NotBlank(message = "省市区不能为空")
    private String region;
}
